package com.eva.service.cms;

import com.eva.dao.cms.CmsResourceGroupMapper;
import com.eva.dao.cms.model.CmsResourceGroup;
import com.eva.framework.mp.service.BaseService;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Service;

@Service
public class CmsResourceGroupService extends BaseService<CmsResourceGroup, CmsResourceGroupMapper> {

    public CmsResourceGroupService(CmsResourceGroupMapper mapper, Environment environment) {
        super(mapper, environment);
    }

    /**
     * 根据唯一标识查询
     *
     * @param uid 唯一标识
     * @return CmsResourceGroup
     */
    public CmsResourceGroup findByUid (String uid) {
        return this.findOne(CmsResourceGroup.builder().uid(uid).build());
    }
}
